/**
 * 机构详细信息窗口
 */
Ext.namespace("Ext.ux.sysmeta");

Ext.ux.sysmeta.SysColumnDetailWindow = Ext.extend(Ext.Window, {
	
	layout: 'fit',
	width: 800,
	height: 325,
	plain: true,
	modal: true,
	border: false,
	
	tableId: null,			//表ID
	tableName: null,	    //表名称
	
	columnId:null,
	
	detailPanel: null,

	initComponent: function(){
		Ext.ux.sysmeta.SysColumnDetailWindow.superclass.initComponent.call(this);
		
		var detailPanel = null;
		
		//编辑字段信息
		if(this.columnId != null ){
			detailPanel = new Ext.ux.sysmeta.SysColumnDetailPanel({parentWinId:this.id, columnId:this.columnId,tableId:this.tableId,tableName:this.tableName, border:false});
		}
		//新增字段
		else if(this.columnId == null ){
			detailPanel = new Ext.ux.sysmeta.SysColumnDetailPanel({parentWinId:this.id,tableId:this.tableId, tableName:this.tableName,border:false});
		}

		this.add(detailPanel);
		this.detailPanel = detailPanel;
	},
	
	showColumnInfo: function(){
		this.detailPanel.loadColumn(this.columnId);
		this.show();
	}
});